package com.city.service.pub.impl;

import com.city.domain.pub.PubKeyTrajectory;
import com.city.repository.pub.PubKeyTrajectoryRepository;
import com.city.service.pub.PubKeyTrajectoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @deprecation:
 * @dmail: 398521613@qq.com
 * @author: L-H
 * @date: 2018-07-26 12:49
 */
@Service
public class PubKeyTrajectoryServiceImpl implements PubKeyTrajectoryService {

    @Autowired
    private PubKeyTrajectoryRepository keyTrajectoryRepository;

    @Override
    public List<PubKeyTrajectory> getPubKeyTrajectoryLimit(String tableName, String idIndex, Integer limitPage, Integer limitNum) {
        return keyTrajectoryRepository.getPubKeyTrajectoryLimit(tableName, idIndex, (limitPage - 1) * limitNum, limitNum);
    }

    @Override
    public List<PubKeyTrajectory> getAll(String tableName, String idIndex) {
        return keyTrajectoryRepository.getAll(tableName,idIndex);
    }
}
